package com.zmovie.framework.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmovie.framework.domain.MovieArea;
import com.zmovie.framework.service.MovieAreaService;
import com.zmovie.framework.mapper.MovieAreaMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【movie_area】的数据库操作Service实现
* @createDate 2023-11-30 12:27:57
*/
@Service
public class MovieAreaServiceImpl extends ServiceImpl<MovieAreaMapper, MovieArea>
    implements MovieAreaService{

    @Override
    public List<MovieArea> listMovieArea(MovieArea movieArea) {
        LambdaQueryWrapper<MovieArea> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(movieArea.getName() != null, MovieArea::getName, movieArea.getName());
        wrapper.orderByAsc(MovieArea::getId);
        return list(wrapper);
    }

}




